
/*  A Bison parser, made from gram.y with Bison version GNU Bison version 1.24
  */

#define YYBISON 1  /* Identify Bison output.  */

#define	INT	258
#define	FLOAT	259
#define	ID	260
#define	VARIABLE	261
#define	STRINGCONST	262
#define	AS	263
#define	CLASS	264
#define	ECHO	265
#define	ELSE	266
#define	EXTENDS	267
#define	FOR	268
#define	FOREACH	269
#define	FUNCTION	270
#define	IF	271
#define	PRINT	272
#define	PRIVATE	273
#define	PROTECTED	274
#define	PUBLIC	275
#define	RETURN	276
#define	STATIC	277
#define	WHILE	278
#define	ARROW	279
#define	KEYVALUE	280
#define	NEW	281
#define	VAR	282
#define	OROPER	283
#define	ANDOPER	284
#define	EQUAL	285
#define	NOTEQUAL	286
#define	CONCATENATION	287
#define	UMINUS	288
#define	UPLUS	289
#define	DOUBLECOLON	290

#line 1 "gram.y"

#include "treefuncs.h"
#include "structs.h"
#include <stdio.h>
#include <malloc.h>


extern int yylex(void);

struct Program *prg;

#line 12 "gram.y"
typedef union {
	int Int;
    float Float;
    char *Id;
    char *Variable;
    char *String_c;			
    
    
    struct Program *prg;
    
    struct NExpr *Expr;
    struct NExprList *ExprList;
    
    struct StmtList *stmtList;
    struct Stmt *_stmt;
    
    struct FuncParamList *_funcParamList;
    struct FuncParam *_funcParam;
} YYSTYPE;

#ifndef YYLTYPE
typedef
  struct yyltype
    {
      int timestamp;
      int first_line;
      int first_column;
      int last_line;
      int last_column;
      char *text;
   }
  yyltype;

#define YYLTYPE yyltype
#endif

#include <stdio.h>

#ifndef __cplusplus
#ifndef __STDC__
#define const
#endif
#endif



#define	YYFINAL		199
#define	YYFLAG		-32768
#define	YYNTBASE	53

#define YYTRANSLATE(x) ((unsigned)(x) <= 290 ? yytranslate[x] : 78)

static const char yytranslate[] = {     0,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,    41,     2,     2,     2,    40,     2,     2,    50,
    46,    38,    36,    51,    35,     2,    39,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,    47,    34,
    28,    33,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    44,     2,    52,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,    48,     2,    49,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     1,     2,     3,     4,     5,
     6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
    16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
    26,    27,    29,    30,    31,    32,    37,    42,    43,    45
};

#if YYDEBUG != 0
static const short yyprhs[] = {     0,
     0,     2,     3,     5,     7,    10,    11,    13,    15,    18,
    20,    22,    24,    27,    31,    34,    36,    38,    40,    42,
    45,    49,    52,    55,    61,    69,    75,    85,    95,   103,
   104,   106,   108,   112,   114,   118,   127,   135,   141,   142,
   144,   146,   149,   151,   153,   160,   167,   174,   180,   185,
   190,   195,   199,   203,   207,   211,   215,   219,   223,   227,
   230,   233,   236,   238,   241,   243,   245,   247,   249,   251,
   255,   259,   263,   267,   271,   275,   279,   283,   287,   291,
   295,   299,   302,   305,   308,   313,   317,   322,   326,   333,
   337,   341,   347,   348,   350,   354
};

static const short yyrhs[] = {    54,
     0,     0,    55,     0,    58,     0,    55,    58,     0,     0,
    57,     0,    59,     0,    57,    59,     0,    59,     0,    68,
     0,    69,     0,    75,    47,     0,    48,    56,    49,     0,
    60,    47,     0,    61,     0,    62,     0,    63,     0,    64,
     0,    21,    47,     0,    21,    75,    47,     0,    10,    76,
     0,    17,    76,     0,    16,    50,    75,    46,    59,     0,
    16,    50,    75,    46,    59,    11,    59,     0,    23,    50,
    75,    46,    59,     0,    13,    50,    75,    47,    75,    47,
    75,    46,    59,     0,    14,    50,    75,     8,     6,    25,
     6,    46,    59,     0,    14,    50,    75,     8,     6,    46,
    59,     0,     0,    67,     0,     6,     0,     6,    28,    75,
     0,    66,     0,    65,    51,    66,     0,    15,     5,    50,
    65,    46,    48,    56,    49,     0,     9,     5,    12,     5,
    48,    70,    49,     0,     9,     5,    48,    70,    49,     0,
     0,    71,     0,    72,     0,    71,    72,     0,    73,     0,
    74,     0,    22,    20,     6,    28,    75,    47,     0,    22,
    18,     6,    28,    75,    47,     0,    22,    19,     6,    28,
    75,    47,     0,    22,     6,    28,    75,    47,     0,    22,
    20,     6,    47,     0,    22,    18,     6,    47,     0,    22,
    19,     6,    47,     0,    22,     6,    47,     0,    20,     6,
    47,     0,    18,     6,    47,     0,    19,     6,    47,     0,
    27,     6,    47,     0,    22,    20,    68,     0,    22,    19,
    68,     0,    22,    18,    68,     0,    20,    68,     0,    18,
    68,     0,    19,    68,     0,    68,     0,    22,    68,     0,
     5,     0,     3,     0,     4,     0,     6,     0,     7,     0,
    75,    35,    75,     0,    75,    36,    75,     0,    75,    38,
    75,     0,    75,    39,    75,     0,    75,    33,    75,     0,
    75,    34,    75,     0,    75,    28,    75,     0,    75,    37,
    75,     0,    75,    29,    75,     0,    75,    30,    75,     0,
    75,    31,    75,     0,    75,    32,    75,     0,    36,    75,
     0,    35,    75,     0,    41,    75,     0,     5,    50,    76,
    46,     0,    50,    75,    46,     0,    75,    44,    75,    52,
     0,    75,    44,    52,     0,    75,    24,     5,    50,    76,
    46,     0,    75,    24,     5,     0,     5,    45,    75,     0,
    26,     5,    50,    76,    46,     0,     0,    77,     0,    77,
    51,    75,     0,    75,     0
};

#endif

#if YYDEBUG != 0
static const short yyrline[] = { 0,
   103,   105,   106,   109,   110,   113,   114,   117,   118,   121,
   122,   123,   126,   127,   128,   129,   130,   131,   132,   133,
   134,   137,   138,   141,   142,   145,   148,   151,   152,   155,
   156,   158,   159,   161,   162,   165,   168,   169,   172,   173,
   176,   177,   180,   181,   184,   185,   186,   187,   188,   189,
   190,   191,   192,   193,   194,   195,   198,   199,   200,   201,
   202,   203,   204,   205,   208,   209,   210,   211,   212,   213,
   214,   215,   216,   217,   218,   219,   220,   221,   222,   223,
   224,   225,   226,   227,   228,   229,   230,   231,   232,   233,
   234,   235,   238,   239,   242,   243
};

static const char * const yytname[] = {   "$","error","$undefined.","INT","FLOAT",
"ID","VARIABLE","STRINGCONST","AS","CLASS","ECHO","ELSE","EXTENDS","FOR","FOREACH",
"FUNCTION","IF","PRINT","PRIVATE","PROTECTED","PUBLIC","RETURN","STATIC","WHILE",
"ARROW","KEYVALUE","NEW","VAR","'='","OROPER","ANDOPER","EQUAL","NOTEQUAL","'>'",
"'<'","'-'","'+'","CONCATENATION","'*'","'/'","'%'","'!'","UMINUS","UPLUS","'['",
"DOUBLECOLON","')'","';'","'{'","'}'","'('","','","']'","program","top_stmt_list",
"top_stmt_list_ne","inner_stmt_list","inner_stmt_list_ne","top_stmt","inner_stmt",
"print_stmt","if_stmt","while_stmt","for_stmt","foreach_stmt","func_param_list",
"func_param","func_param_list_ne","func_decl_stmt","class_decl_stmt","class_decl_stmt_list",
"class_decl_stmt_list_ne","class_decl_stmt_list_item","field_decl_stmt","method_decl_stmt",
"expr","expr_list","expr_list_ne",""
};
#endif

static const short yyr1[] = {     0,
    53,    54,    54,    55,    55,    56,    56,    57,    57,    58,
    58,    58,    59,    59,    59,    59,    59,    59,    59,    59,
    59,    60,    60,    61,    61,    62,    63,    64,    64,    65,
    65,    66,    66,    67,    67,    68,    69,    69,    70,    70,
    71,    71,    72,    72,    73,    73,    73,    73,    73,    73,
    73,    73,    73,    73,    73,    73,    74,    74,    74,    74,
    74,    74,    74,    74,    75,    75,    75,    75,    75,    75,
    75,    75,    75,    75,    75,    75,    75,    75,    75,    75,
    75,    75,    75,    75,    75,    75,    75,    75,    75,    75,
    75,    75,    76,    76,    77,    77
};

static const short yyr2[] = {     0,
     1,     0,     1,     1,     2,     0,     1,     1,     2,     1,
     1,     1,     2,     3,     2,     1,     1,     1,     1,     2,
     3,     2,     2,     5,     7,     5,     9,     9,     7,     0,
     1,     1,     3,     1,     3,     8,     7,     5,     0,     1,
     1,     2,     1,     1,     6,     6,     6,     5,     4,     4,
     4,     3,     3,     3,     3,     3,     3,     3,     3,     2,
     2,     2,     1,     2,     1,     1,     1,     1,     1,     3,
     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
     3,     2,     2,     2,     4,     3,     4,     3,     6,     3,
     3,     5,     0,     1,     3,     1
};

static const short yydefact[] = {     2,
    66,    67,    65,    68,    69,     0,    93,     0,     0,     0,
     0,    93,     0,     0,     0,     0,     0,     0,     6,     0,
     1,     3,     4,    10,     0,    16,    17,    18,    19,    11,
    12,     0,     0,    93,     0,    96,    22,    94,     0,     0,
     0,     0,    23,    20,     0,     0,     0,    83,    82,    84,
     0,     7,     8,     0,     5,    15,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
    13,    91,     0,     0,    39,     0,     0,     0,    30,     0,
    21,     0,    93,    14,     9,    86,    90,    76,    78,    79,
    80,    81,    74,    75,    70,    71,    77,    72,    73,    88,
     0,    85,     0,     0,     0,     0,     0,     0,    63,     0,
    40,    41,    43,    44,    95,     0,     0,    32,     0,    34,
    31,     0,     0,     0,    93,    87,    39,     0,    61,     0,
    62,     0,    60,     0,     0,     0,     0,    64,     0,    38,
    42,     0,     0,     0,     0,     0,    24,    26,    92,     0,
     0,    54,    55,    53,     0,    52,     0,    59,     0,    58,
     0,    57,    56,     0,     0,     0,    33,     6,    35,     0,
    89,    37,     0,     0,    50,     0,    51,     0,    49,     0,
     0,    29,     0,    25,    48,     0,     0,     0,     0,     0,
    36,    46,    47,    45,    27,    28,     0,     0,     0
};

static const short yydefgoto[] = {   197,
    21,    22,    51,    52,    23,    24,    25,    26,    27,    28,
    29,   119,   120,   121,   109,    31,   110,   111,   112,   113,
   114,    32,    37,    38
};

static const short yypact[] = {   172,
-32768,-32768,   -28,-32768,-32768,    11,   236,   -42,   -31,    15,
    -9,   236,    91,    -2,    35,   236,   236,   236,   211,   236,
-32768,   172,-32768,-32768,    17,-32768,-32768,-32768,-32768,-32768,
-32768,   301,   236,   236,   -11,   545,-32768,    16,   236,   236,
    28,   236,-32768,-32768,   322,   236,    29,    -6,    -6,    -6,
    21,   211,-32768,   469,-32768,-32768,    88,   236,   236,   236,
   236,   236,   236,   236,   236,   236,   236,   236,   236,    39,
-32768,-32768,    54,    96,   141,   236,   343,   259,    98,   488,
-32768,   507,   236,-32768,-32768,-32768,    55,   545,   561,   577,
   593,   593,    48,    48,    64,    64,    64,    -6,    -6,-32768,
   276,-32768,    73,     6,     8,    62,   104,   122,-32768,    81,
   141,-32768,-32768,-32768,   545,   236,   125,   105,    20,-32768,
-32768,   211,   211,    89,   236,-32768,   141,    87,-32768,    92,
-32768,    93,-32768,   -13,    84,   110,   114,-32768,    99,-32768,
-32768,   364,   -21,   236,    97,    98,   136,-32768,-32768,    90,
   100,-32768,-32768,-32768,   236,-32768,     0,-32768,     2,-32768,
     3,-32768,-32768,   236,   145,   211,   545,   211,-32768,   211,
-32768,-32768,   385,   236,-32768,   236,-32768,   236,-32768,   526,
   107,-32768,   106,-32768,-32768,   406,   427,   448,   211,   211,
-32768,-32768,-32768,-32768,-32768,-32768,   158,   162,-32768
};

static const short yypgoto[] = {-32768,
-32768,-32768,    -4,-32768,   143,   -16,-32768,-32768,-32768,-32768,
-32768,-32768,    24,-32768,     7,-32768,    45,-32768,    69,-32768,
-32768,    -7,   -10,-32768
};


#define	YYLAST		637


static const short yytable[] = {    36,
    74,    43,    53,   165,    36,    45,    30,    39,    48,    49,
    50,   128,    54,   130,   155,    35,    33,    57,    40,    41,
    10,    34,    10,    73,   166,    72,    36,   174,    30,   176,
   178,    77,    78,   156,    80,    85,    75,    70,    82,    47,
    42,     1,     2,     3,     4,     5,   175,    46,   177,   179,
    88,    89,    90,    91,    92,    93,    94,    95,    96,    97,
    98,    99,   101,    56,    15,   145,    76,   132,   115,    84,
   146,    57,   124,    16,    17,    36,    10,    79,    83,    18,
-32768,-32768,    65,    66,    67,    68,    69,    57,    20,   157,
   100,    70,    87,     1,     2,     3,     4,     5,    10,   102,
   103,    68,    69,   118,   125,   147,   148,    70,   142,   134,
   129,   131,   133,   138,   150,   159,    15,    36,    10,   161,
   127,   135,   136,   137,    10,    16,    17,   139,    10,   140,
   143,    18,   144,   152,   149,   171,   167,    44,   153,   154,
    20,   158,   160,   162,   168,   163,   170,   173,   172,   182,
   181,    53,   190,   184,   191,    10,   180,   198,   104,   105,
   106,   199,   107,   183,    55,     0,   186,   108,   187,   169,
   188,   151,   195,   196,     1,     2,     3,     4,     5,   141,
     6,     7,     0,     0,     8,     9,    10,    11,    12,     0,
     0,     0,    13,     0,    14,     0,     0,    15,     0,     0,
     0,     0,     0,     0,     0,     0,    16,    17,     0,     0,
     0,     0,    18,     1,     2,     3,     4,     5,     0,    19,
     7,    20,     0,     8,     9,     0,    11,    12,     0,     0,
     0,    13,     0,    14,     0,     0,    15,     0,     1,     2,
     3,     4,     5,     0,     0,    16,    17,     0,     0,     0,
     0,    18,     0,     0,     0,     0,     0,     0,    19,     0,
    20,    15,     0,     0,     0,     0,   117,     0,     0,     0,
    16,    17,     0,     0,     0,     0,    18,     0,     0,     0,
     0,     0,    57,     0,     0,    20,    58,    59,    60,    61,
    62,    63,    64,    65,    66,    67,    68,    69,     0,    57,
     0,     0,    70,    58,    59,    60,    61,    62,    63,    64,
    65,    66,    67,    68,    69,     0,     0,     0,     0,    70,
     0,     0,     0,     0,    57,     0,     0,   126,    58,    59,
    60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
     0,     0,     0,     0,    70,    57,     0,    71,     0,    58,
    59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
    69,     0,     0,     0,     0,    70,    57,     0,    81,     0,
    58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
    68,    69,     0,     0,     0,     0,    70,    57,     0,   116,
     0,    58,    59,    60,    61,    62,    63,    64,    65,    66,
    67,    68,    69,     0,     0,     0,     0,    70,    57,     0,
   164,     0,    58,    59,    60,    61,    62,    63,    64,    65,
    66,    67,    68,    69,     0,     0,     0,     0,    70,    57,
     0,   185,     0,    58,    59,    60,    61,    62,    63,    64,
    65,    66,    67,    68,    69,     0,     0,     0,     0,    70,
    57,     0,   192,     0,    58,    59,    60,    61,    62,    63,
    64,    65,    66,    67,    68,    69,     0,     0,     0,     0,
    70,    57,     0,   193,     0,    58,    59,    60,    61,    62,
    63,    64,    65,    66,    67,    68,    69,     0,     0,     0,
     0,    70,    57,     0,   194,     0,    58,    59,    60,    61,
    62,    63,    64,    65,    66,    67,    68,    69,     0,     0,
     0,    57,    70,     0,    86,    58,    59,    60,    61,    62,
    63,    64,    65,    66,    67,    68,    69,     0,     0,     0,
    57,    70,     0,   122,    58,    59,    60,    61,    62,    63,
    64,    65,    66,    67,    68,    69,     0,     0,     0,    57,
    70,     0,   123,    58,    59,    60,    61,    62,    63,    64,
    65,    66,    67,    68,    69,     0,     0,     0,    57,    70,
     0,   189,    58,    59,    60,    61,    62,    63,    64,    65,
    66,    67,    68,    69,    57,     0,     0,     0,    70,     0,
    60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
    57,     0,     0,     0,    70,     0,     0,    61,    62,    63,
    64,    65,    66,    67,    68,    69,    57,     0,     0,     0,
    70,     0,     0,-32768,-32768,    63,    64,    65,    66,    67,
    68,    69,     0,     0,     0,     0,    70
};

static const short yycheck[] = {     7,
    12,    12,    19,    25,    12,    13,     0,    50,    16,    17,
    18,     6,    20,     6,    28,     5,    45,    24,    50,     5,
    15,    50,    15,    34,    46,    33,    34,    28,    22,    28,
    28,    39,    40,    47,    42,    52,    48,    44,    46,     5,
    50,     3,     4,     5,     6,     7,    47,    50,    47,    47,
    58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
    68,    69,    70,    47,    26,    46,    51,     6,    76,    49,
    51,    24,    83,    35,    36,    83,    15,    50,    50,    41,
    33,    34,    35,    36,    37,    38,    39,    24,    50,     6,
    52,    44,     5,     3,     4,     5,     6,     7,    15,    46,
     5,    38,    39,     6,    50,   122,   123,    44,   116,     6,
   104,   105,   106,   107,   125,     6,    26,   125,    15,     6,
    48,    18,    19,    20,    15,    35,    36,     6,    15,    49,
     6,    41,    28,    47,    46,    46,   144,    47,    47,    47,
    50,   135,   136,   137,    48,    47,    11,   155,    49,   166,
     6,   168,    46,   170,    49,    15,   164,     0,    18,    19,
    20,     0,    22,   168,    22,    -1,   174,    27,   176,   146,
   178,   127,   189,   190,     3,     4,     5,     6,     7,   111,
     9,    10,    -1,    -1,    13,    14,    15,    16,    17,    -1,
    -1,    -1,    21,    -1,    23,    -1,    -1,    26,    -1,    -1,
    -1,    -1,    -1,    -1,    -1,    -1,    35,    36,    -1,    -1,
    -1,    -1,    41,     3,     4,     5,     6,     7,    -1,    48,
    10,    50,    -1,    13,    14,    -1,    16,    17,    -1,    -1,
    -1,    21,    -1,    23,    -1,    -1,    26,    -1,     3,     4,
     5,     6,     7,    -1,    -1,    35,    36,    -1,    -1,    -1,
    -1,    41,    -1,    -1,    -1,    -1,    -1,    -1,    48,    -1,
    50,    26,    -1,    -1,    -1,    -1,     8,    -1,    -1,    -1,
    35,    36,    -1,    -1,    -1,    -1,    41,    -1,    -1,    -1,
    -1,    -1,    24,    -1,    -1,    50,    28,    29,    30,    31,
    32,    33,    34,    35,    36,    37,    38,    39,    -1,    24,
    -1,    -1,    44,    28,    29,    30,    31,    32,    33,    34,
    35,    36,    37,    38,    39,    -1,    -1,    -1,    -1,    44,
    -1,    -1,    -1,    -1,    24,    -1,    -1,    52,    28,    29,
    30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
    -1,    -1,    -1,    -1,    44,    24,    -1,    47,    -1,    28,
    29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
    39,    -1,    -1,    -1,    -1,    44,    24,    -1,    47,    -1,
    28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
    38,    39,    -1,    -1,    -1,    -1,    44,    24,    -1,    47,
    -1,    28,    29,    30,    31,    32,    33,    34,    35,    36,
    37,    38,    39,    -1,    -1,    -1,    -1,    44,    24,    -1,
    47,    -1,    28,    29,    30,    31,    32,    33,    34,    35,
    36,    37,    38,    39,    -1,    -1,    -1,    -1,    44,    24,
    -1,    47,    -1,    28,    29,    30,    31,    32,    33,    34,
    35,    36,    37,    38,    39,    -1,    -1,    -1,    -1,    44,
    24,    -1,    47,    -1,    28,    29,    30,    31,    32,    33,
    34,    35,    36,    37,    38,    39,    -1,    -1,    -1,    -1,
    44,    24,    -1,    47,    -1,    28,    29,    30,    31,    32,
    33,    34,    35,    36,    37,    38,    39,    -1,    -1,    -1,
    -1,    44,    24,    -1,    47,    -1,    28,    29,    30,    31,
    32,    33,    34,    35,    36,    37,    38,    39,    -1,    -1,
    -1,    24,    44,    -1,    46,    28,    29,    30,    31,    32,
    33,    34,    35,    36,    37,    38,    39,    -1,    -1,    -1,
    24,    44,    -1,    46,    28,    29,    30,    31,    32,    33,
    34,    35,    36,    37,    38,    39,    -1,    -1,    -1,    24,
    44,    -1,    46,    28,    29,    30,    31,    32,    33,    34,
    35,    36,    37,    38,    39,    -1,    -1,    -1,    24,    44,
    -1,    46,    28,    29,    30,    31,    32,    33,    34,    35,
    36,    37,    38,    39,    24,    -1,    -1,    -1,    44,    -1,
    30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
    24,    -1,    -1,    -1,    44,    -1,    -1,    31,    32,    33,
    34,    35,    36,    37,    38,    39,    24,    -1,    -1,    -1,
    44,    -1,    -1,    31,    32,    33,    34,    35,    36,    37,
    38,    39,    -1,    -1,    -1,    -1,    44
};
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
#line 3 "bison.simple"

/* Skeleton output parser for bison,
   Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */

/* As a special exception, when this file is copied by Bison into a
   Bison output file, you may use that output file without restriction.
   This special exception was added by the Free Software Foundation
   in version 1.24 of Bison.  */

#ifndef alloca
#ifdef __GNUC__
#define alloca __builtin_alloca
#else /* not GNU C.  */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
#include <alloca.h>
#else /* not sparc */
#if defined (MSDOS) && !defined (__TURBOC__)
#include <malloc.h>
#else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
#include <malloc.h>
 #pragma alloca
#else /* not MSDOS, __TURBOC__, or _AIX */
#ifdef __hpux
#ifdef __cplusplus
extern "C" {
void *alloca (unsigned int);
};
#else /* not __cplusplus */
void *alloca ();
#endif /* not __cplusplus */
#endif /* __hpux */
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
#endif /* not sparc.  */
#endif /* not GNU C.  */
#endif /* alloca not defined.  */

/* This is the parser code that is written into each bison parser
  when the %semantic_parser declaration is not specified in the grammar.
  It was written by Richard Stallman by simplifying the hairy parser
  used when %semantic_parser is specified.  */

/* Note: there must be only one dollar sign in this file.
   It is replaced by the list of actions, each action
   as one case of the switch.  */

#define yyerrok		(yyerrstatus = 0)
#define yyclearin	(yychar = YYEMPTY)
#define YYEMPTY		-2
#define YYEOF		0
#define YYACCEPT	return(0)
#define YYABORT 	return(1)
#define YYERROR		goto yyerrlab1
/* Like YYERROR except do call yyerror.
   This remains here temporarily to ease the
   transition to the new meaning of YYERROR, for GCC.
   Once GCC version 2 has supplanted version 1, this can go.  */
#define YYFAIL		goto yyerrlab
#define YYRECOVERING()  (!!yyerrstatus)
#define YYBACKUP(token, value) \
do								\
  if (yychar == YYEMPTY && yylen == 1)				\
    { yychar = (token), yylval = (value);			\
      yychar1 = YYTRANSLATE (yychar);				\
      YYPOPSTACK;						\
      goto yybackup;						\
    }								\
  else								\
    { yyerror ("syntax error: cannot back up"); YYERROR; }	\
while (0)

#define YYTERROR	1
#define YYERRCODE	256

#ifndef YYPURE
#define YYLEX		yylex()
#endif

#ifdef YYPURE
#ifdef YYLSP_NEEDED
#ifdef YYLEX_PARAM
#define YYLEX		yylex(&yylval, &yylloc, YYLEX_PARAM)
#else
#define YYLEX		yylex(&yylval, &yylloc)
#endif
#else /* not YYLSP_NEEDED */
#ifdef YYLEX_PARAM
#define YYLEX		yylex(&yylval, YYLEX_PARAM)
#else
#define YYLEX		yylex(&yylval)
#endif
#endif /* not YYLSP_NEEDED */
#endif

/* If nonreentrant, generate the variables here */

#ifndef YYPURE

int	yychar;			/*  the lookahead symbol		*/
YYSTYPE	yylval;			/*  the semantic value of the		*/
				/*  lookahead symbol			*/

#ifdef YYLSP_NEEDED
YYLTYPE yylloc;			/*  location data for the lookahead	*/
				/*  symbol				*/
#endif

int yynerrs;			/*  number of parse errors so far       */
#endif  /* not YYPURE */

#if YYDEBUG != 0
int yydebug;			/*  nonzero means print parse trace	*/
/* Since this is uninitialized, it does not stop multiple parsers
   from coexisting.  */
#endif

/*  YYINITDEPTH indicates the initial size of the parser's stacks	*/

#ifndef	YYINITDEPTH
#define YYINITDEPTH 200
#endif

/*  YYMAXDEPTH is the maximum size the stacks can grow to
    (effective only if the built-in stack extension method is used).  */

#if YYMAXDEPTH == 0
#undef YYMAXDEPTH
#endif

#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif

/* Prevent warning if -Wstrict-prototypes.  */
#ifdef __GNUC__
int yyparse (void);
#endif

#if __GNUC__ > 1		/* GNU C and GNU C++ define this.  */
#define __yy_memcpy(FROM,TO,COUNT)	__builtin_memcpy(TO,FROM,COUNT)
#else				/* not GNU C or C++ */
#ifndef __cplusplus

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */
static void
__yy_memcpy (from, to, count)
     char *from;
     char *to;
     int count;
{
  register char *f = from;
  register char *t = to;
  register int i = count;

  while (i-- > 0)
    *t++ = *f++;
}

#else /* __cplusplus */

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */
static void
__yy_memcpy (char *from, char *to, int count)
{
  register char *f = from;
  register char *t = to;
  register int i = count;

  while (i-- > 0)
    *t++ = *f++;
}

#endif
#endif

#line 192 "bison.simple"

/* The user can define YYPARSE_PARAM as the name of an argument to be passed
   into yyparse.  The argument should have type void *.
   It should actually point to an object.
   Grammar actions can access the variable by casting it
   to the proper pointer type.  */

#ifdef YYPARSE_PARAM
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
#else
#define YYPARSE_PARAM
#define YYPARSE_PARAM_DECL
#endif

int
yyparse(YYPARSE_PARAM)
     YYPARSE_PARAM_DECL
{
  register int yystate;
  register int yyn;
  register short *yyssp;
  register YYSTYPE *yyvsp;
  int yyerrstatus;	/*  number of tokens to shift before error messages enabled */
  int yychar1 = 0;		/*  lookahead token as an internal (translated) token number */

  short	yyssa[YYINITDEPTH];	/*  the state stack			*/
  YYSTYPE yyvsa[YYINITDEPTH];	/*  the semantic value stack		*/

  short *yyss = yyssa;		/*  refer to the stacks thru separate pointers */
  YYSTYPE *yyvs = yyvsa;	/*  to allow yyoverflow to reallocate them elsewhere */

#ifdef YYLSP_NEEDED
  YYLTYPE yylsa[YYINITDEPTH];	/*  the location stack			*/
  YYLTYPE *yyls = yylsa;
  YYLTYPE *yylsp;

#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
#else
#define YYPOPSTACK   (yyvsp--, yyssp--)
#endif

  int yystacksize = YYINITDEPTH;

#ifdef YYPURE
  int yychar;
  YYSTYPE yylval;
  int yynerrs;
#ifdef YYLSP_NEEDED
  YYLTYPE yylloc;
#endif
#endif

  YYSTYPE yyval;		/*  the variable used to return		*/
				/*  semantic values from the action	*/
				/*  routines				*/

  int yylen;

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Starting parse\n");
#endif

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY;		/* Cause a token to be read.  */

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */

  yyssp = yyss - 1;
  yyvsp = yyvs;
#ifdef YYLSP_NEEDED
  yylsp = yyls;
#endif

/* Push a new state, which is found in  yystate  .  */
/* In all cases, when you get here, the value and location stacks
   have just been pushed. so pushing a state here evens the stacks.  */
yynewstate:

  *++yyssp = yystate;

  if (yyssp >= yyss + yystacksize - 1)
    {
      /* Give user a chance to reallocate the stack */
      /* Use copies of these so that the &'s don't force the real ones into memory. */
      YYSTYPE *yyvs1 = yyvs;
      short *yyss1 = yyss;
#ifdef YYLSP_NEEDED
      YYLTYPE *yyls1 = yyls;
#endif

      /* Get the current used size of the three stacks, in elements.  */
      int size = yyssp - yyss + 1;

#ifdef yyoverflow
      /* Each stack pointer address is followed by the size of
	 the data in use in that stack, in bytes.  */
#ifdef YYLSP_NEEDED
      /* This used to be a conditional around just the two extra args,
	 but that might be undefined if yyoverflow is a macro.  */
      yyoverflow("parser stack overflow",
		 &yyss1, size * sizeof (*yyssp),
		 &yyvs1, size * sizeof (*yyvsp),
		 &yyls1, size * sizeof (*yylsp),
		 &yystacksize);
#else
      yyoverflow("parser stack overflow",
		 &yyss1, size * sizeof (*yyssp),
		 &yyvs1, size * sizeof (*yyvsp),
		 &yystacksize);
#endif

      yyss = yyss1; yyvs = yyvs1;
#ifdef YYLSP_NEEDED
      yyls = yyls1;
#endif
#else /* no yyoverflow */
      /* Extend the stack our own way.  */
      if (yystacksize >= YYMAXDEPTH)
	{
	  yyerror("parser stack overflow");
	  return 2;
	}
      yystacksize *= 2;
      if (yystacksize > YYMAXDEPTH)
	yystacksize = YYMAXDEPTH;
      yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
      __yy_memcpy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
      yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
      __yy_memcpy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
      yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
      __yy_memcpy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
#endif
#endif /* no yyoverflow */

      yyssp = yyss + size - 1;
      yyvsp = yyvs + size - 1;
#ifdef YYLSP_NEEDED
      yylsp = yyls + size - 1;
#endif

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Stack size increased to %d\n", yystacksize);
#endif

      if (yyssp >= yyss + yystacksize - 1)
	YYABORT;
    }

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Entering state %d\n", yystate);
#endif

  goto yybackup;
 yybackup:

/* Do appropriate processing given the current state.  */
/* Read a lookahead token if we need one and don't already have one.  */
/* yyresume: */

  /* First try to decide what to do without reference to lookahead token.  */

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* yychar is either YYEMPTY or YYEOF
     or a valid token in external form.  */

  if (yychar == YYEMPTY)
    {
#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Reading a token: ");
#endif
      yychar = YYLEX;
    }

  /* Convert token to internal form (in yychar1) for indexing tables with */

  if (yychar <= 0)		/* This means end of input. */
    {
      yychar1 = 0;
      yychar = YYEOF;		/* Don't call YYLEX any more */

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Now at end of input.\n");
#endif
    }
  else
    {
      yychar1 = YYTRANSLATE(yychar);

#if YYDEBUG != 0
      if (yydebug)
	{
	  fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
	  /* Give the individual parser a way to print the precise meaning
	     of a token, for further debugging info.  */
#ifdef YYPRINT
	  YYPRINT (stderr, yychar, yylval);
#endif
	  fprintf (stderr, ")\n");
	}
#endif
    }

  yyn += yychar1;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
    goto yydefault;

  yyn = yytable[yyn];

  /* yyn is what to do for this token type in this state.
     Negative => reduce, -yyn is rule number.
     Positive => shift, yyn is new state.
       New state is final state => don't bother to shift,
       just return success.
     0, or most negative number => error.  */

  if (yyn < 0)
    {
      if (yyn == YYFLAG)
	goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrlab;

  if (yyn == YYFINAL)
    YYACCEPT;

  /* Shift the lookahead token.  */

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
#endif

  /* Discard the token being shifted unless it is eof.  */
  if (yychar != YYEOF)
    yychar = YYEMPTY;

  *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  /* count tokens shifted since error; after three, turn off error status.  */
  if (yyerrstatus) yyerrstatus--;

  yystate = yyn;
  goto yynewstate;

/* Do the default action for the current state.  */
yydefault:

  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;

/* Do a reduction.  yyn is the number of a rule to reduce with.  */
yyreduce:
  yylen = yyr2[yyn];
  if (yylen > 0)
    yyval = yyvsp[1-yylen]; /* implement default value of the action */

#if YYDEBUG != 0
  if (yydebug)
    {
      int i;

      fprintf (stderr, "Reducing via rule %d (line %d), ",
	       yyn, yyrline[yyn]);

      /* Print the symbols being reduced, and their result.  */
      for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
	fprintf (stderr, "%s ", yytname[yyrhs[i]]);
      fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
    }
#endif


  switch (yyn) {

case 1:
#line 103 "gram.y"
{yyval.prg = prg = createProgram(yyvsp[0].stmtList);;
    break;}
case 2:
#line 105 "gram.y"
{yyval.stmtList=NULL;;
    break;}
case 3:
#line 106 "gram.y"
{yyval.stmtList=yyvsp[0].stmtList;;
    break;}
case 4:
#line 109 "gram.y"
{yyval.stmtList=CreateStmtList(yyvsp[0]._stmt);;
    break;}
case 5:
#line 110 "gram.y"
{yyval.stmtList=AddToStmtList(yyvsp[-1].stmtList, yyvsp[0]._stmt);;
    break;}
case 6:
#line 113 "gram.y"
{yyval.stmtList=NULL;
    break;}
case 7:
#line 114 "gram.y"
{yyval.stmtList=yyvsp[0].stmtList;
    break;}
case 8:
#line 117 "gram.y"
{yyval.stmtList=CreateStmtList(yyvsp[0]._stmt);;
    break;}
case 9:
#line 118 "gram.y"
{yyval.stmtList=AddToStmtList(yyvsp[-1].stmtList, yyvsp[0]._stmt);;
    break;}
case 10:
#line 121 "gram.y"
{yyval._stmt=yyvsp[0]._stmt;;
    break;}
case 11:
#line 122 "gram.y"
{yyval._stmt=yyvsp[0]._stmt;;
    break;}
case 12:
#line 123 "gram.y"
{yyval._stmt=yyvsp[0]._stmt;;
    break;}
case 13:
#line 126 "gram.y"
{yyval._stmt=CreateExprStmt(yyvsp[-1].Expr);;
    break;}
case 14:
#line 127 "gram.y"
{yyval._stmt=CreateStmtListStmt(yyvsp[-1].stmtList);;
    break;}
case 15:
#line 128 "gram.y"
{yyval._stmt=yyvsp[-1]._stmt;
    break;}
case 16:
#line 129 "gram.y"
{yyval._stmt=yyvsp[0]._stmt;
    break;}
case 17:
#line 130 "gram.y"
{yyval._stmt=yyvsp[0]._stmt;
    break;}
case 18:
#line 131 "gram.y"
{yyval._stmt=yyvsp[0]._stmt;
    break;}
case 19:
#line 132 "gram.y"
{yyval._stmt=yyvsp[0]._stmt;
    break;}
case 20:
#line 133 "gram.y"
{yyval._stmt=CreateReturnStmt(NULL);;
    break;}
case 21:
#line 134 "gram.y"
{yyval._stmt=CreateReturnStmt(yyvsp[-1].Expr);;
    break;}
case 22:
#line 137 "gram.y"
{yyval._stmt = CreatePrintStmt(Echo, yyvsp[0].ExprList);;
    break;}
case 23:
#line 138 "gram.y"
{yyval._stmt = CreatePrintStmt(Print, yyvsp[0].ExprList);;
    break;}
case 24:
#line 141 "gram.y"
{yyval._stmt=CreateIfStmt(yyvsp[-2].Expr, yyvsp[0]._stmt, NULL);;
    break;}
case 25:
#line 142 "gram.y"
{yyval._stmt=CreateIfStmt(yyvsp[-4].Expr,yyvsp[-2]._stmt, yyvsp[0]._stmt);;
    break;}
case 26:
#line 145 "gram.y"
{yyval._stmt=CreateWhileStmt(yyvsp[-2].Expr, yyvsp[0]._stmt);;
    break;}
case 27:
#line 148 "gram.y"
{yyval._stmt=CreateForStmt(yyvsp[-6].Expr, yyvsp[-4].Expr, yyvsp[-2].Expr, yyvsp[0]._stmt);;
    break;}
case 28:
#line 151 "gram.y"
{yyval._stmt=CreateForeachStmt(yyvsp[-6].Expr, yyvsp[-4].Variable, yyvsp[-2].Variable, yyvsp[0]._stmt);;
    break;}
case 29:
#line 152 "gram.y"
{yyval._stmt=CreateForeachStmt(yyvsp[-4].Expr, yyvsp[-2].Variable, NULL, yyvsp[0]._stmt);;
    break;}
case 30:
#line 155 "gram.y"
{yyval._funcParamList=NULL;
    break;}
case 31:
#line 156 "gram.y"
{yyval._funcParamList=yyvsp[0]._funcParamList;
    break;}
case 32:
#line 158 "gram.y"
{yyval._funcParam=CreateFuncParam(yyvsp[0].Variable, NULL);;
    break;}
case 33:
#line 159 "gram.y"
{yyval._funcParam=CreateFuncParam(yyvsp[-2].Variable, yyvsp[0].Expr);;
    break;}
case 34:
#line 161 "gram.y"
{yyval._funcParamList=CreateFuncParamList(yyvsp[0]._funcParam);;
    break;}
case 35:
#line 162 "gram.y"
{yyval._funcParamList = AddToFuncParamList(yyvsp[-2]._funcParamList, yyvsp[0]._funcParam);;
    break;}
case 36:
#line 165 "gram.y"
{yyval._stmt=CreateFuncDeclStmt(yyvsp[-6].Id, yyvsp[-4]._funcParamList, yyvsp[-1].stmtList);;
    break;}
case 37:
#line 168 "gram.y"
{yyval._stmt=CreateClassDeclStmt(yyvsp[-5].Id, yyvsp[-3].Id, yyvsp[-1].stmtList);;
    break;}
case 38:
#line 169 "gram.y"
{yyval._stmt=CreateClassDeclStmt(yyvsp[-3].Id, NULL, yyvsp[-1].stmtList);;
    break;}
case 39:
#line 172 "gram.y"
{yyval.stmtList=NULL;
    break;}
case 40:
#line 173 "gram.y"
{yyval.stmtList=yyvsp[0].stmtList;
    break;}
case 41:
#line 176 "gram.y"
{yyval.stmtList=CreateStmtList(yyvsp[0]._stmt);;
    break;}
case 42:
#line 177 "gram.y"
{yyval.stmtList=AddToStmtList(yyvsp[-1].stmtList, yyvsp[0]._stmt);;
    break;}
case 43:
#line 180 "gram.y"
{yyval._stmt=yyvsp[0]._stmt;
    break;}
case 44:
#line 181 "gram.y"
{yyval._stmt=yyvsp[0]._stmt;
    break;}
case 45:
#line 184 "gram.y"
{yyval._stmt=CreateFieldDeclStmt(1, Public, yyvsp[-3].Variable, yyvsp[-1].Expr);;
    break;}
case 46:
#line 185 "gram.y"
{yyval._stmt=CreateFieldDeclStmt(1, Private, yyvsp[-3].Variable, yyvsp[-1].Expr);;
    break;}
case 47:
#line 186 "gram.y"
{yyval._stmt=CreateFieldDeclStmt(1, Protected, yyvsp[-3].Variable, yyvsp[-1].Expr);;
    break;}
case 48:
#line 187 "gram.y"
{yyval._stmt=CreateFieldDeclStmt(1, Public, yyvsp[-3].Variable, yyvsp[-1].Expr);;
    break;}
case 49:
#line 188 "gram.y"
{yyval._stmt=CreateFieldDeclStmt(1, Public, yyvsp[-1].Variable, NULL);;
    break;}
case 50:
#line 189 "gram.y"
{yyval._stmt=CreateFieldDeclStmt(1, Private, yyvsp[-1].Variable, NULL);;
    break;}
case 51:
#line 190 "gram.y"
{yyval._stmt=CreateFieldDeclStmt(1, Protected, yyvsp[-1].Variable, NULL);;
    break;}
case 52:
#line 191 "gram.y"
{yyval._stmt=CreateFieldDeclStmt(1, Private, yyvsp[-1].Variable, NULL);;
    break;}
case 53:
#line 192 "gram.y"
{yyval._stmt=CreateFieldDeclStmt(0, Public, yyvsp[-1].Variable, NULL);;
    break;}
case 54:
#line 193 "gram.y"
{yyval._stmt=CreateFieldDeclStmt(0, Private, yyvsp[-1].Variable, NULL);;
    break;}
case 55:
#line 194 "gram.y"
{yyval._stmt=CreateFieldDeclStmt(0, Protected, yyvsp[-1].Variable, NULL);;
    break;}
case 56:
#line 195 "gram.y"
{yyval._stmt=CreateFieldDeclStmt(0, Private, yyvsp[-1].Variable, NULL);;
    break;}
case 57:
#line 198 "gram.y"
{yyval._stmt=CreateMethodDeclStmt(1, Public, yyvsp[0]._stmt);;
    break;}
case 58:
#line 199 "gram.y"
{yyval._stmt=CreateMethodDeclStmt(1, Protected, yyvsp[0]._stmt);;
    break;}
case 59:
#line 200 "gram.y"
{yyval._stmt=CreateMethodDeclStmt(1, Private, yyvsp[0]._stmt);;
    break;}
case 60:
#line 201 "gram.y"
{yyval._stmt=CreateMethodDeclStmt(0, Public, yyvsp[0]._stmt);;
    break;}
case 61:
#line 202 "gram.y"
{yyval._stmt=CreateMethodDeclStmt(0, Protected, yyvsp[0]._stmt);;
    break;}
case 62:
#line 203 "gram.y"
{yyval._stmt=CreateMethodDeclStmt(0, Private, yyvsp[0]._stmt);;
    break;}
case 63:
#line 204 "gram.y"
{yyval._stmt=CreateMethodDeclStmt(0, Private, yyvsp[0]._stmt);;
    break;}
case 64:
#line 205 "gram.y"
{yyval._stmt=CreateMethodDeclStmt(1, Private, yyvsp[0]._stmt);;
    break;}
case 65:
#line 208 "gram.y"
{yyval.Expr = createExpr(Id);;
    break;}
case 66:
#line 209 "gram.y"
{yyval.Expr = createExpr(Int);;
    break;}
case 67:
#line 210 "gram.y"
{yyval.Expr = createExpr(Float);;
    break;}
case 68:
#line 211 "gram.y"
{yyval.Expr = createExpr(Variable);;
    break;}
case 69:
#line 212 "gram.y"
{yyval.Expr = createExpr(StringConst);;
    break;}
case 70:
#line 213 "gram.y"
{yyval.Expr = createBinaryExpr(Minus, yyvsp[-2].Expr, yyvsp[0].Expr);;
    break;}
case 71:
#line 214 "gram.y"
{yyval.Expr = createBinaryExpr(Plus, yyvsp[-2].Expr, yyvsp[0].Expr);;
    break;}
case 72:
#line 215 "gram.y"
{yyval.Expr = createBinaryExpr(Mul, yyvsp[-2].Expr, yyvsp[0].Expr);;
    break;}
case 73:
#line 216 "gram.y"
{yyval.Expr = createBinaryExpr(Div, yyvsp[-2].Expr, yyvsp[0].Expr);;
    break;}
case 74:
#line 217 "gram.y"
{yyval.Expr = createBinaryExpr(More, yyvsp[-2].Expr, yyvsp[0].Expr);;
    break;}
case 75:
#line 218 "gram.y"
{yyval.Expr = createBinaryExpr(Less, yyvsp[-2].Expr, yyvsp[0].Expr);;
    break;}
case 76:
#line 219 "gram.y"
{yyval.Expr = createBinaryExpr(Assign, yyvsp[-2].Expr, yyvsp[0].Expr);;
    break;}
case 77:
#line 220 "gram.y"
{yyval.Expr = createBinaryExpr(Concatenation, yyvsp[-2].Expr, yyvsp[0].Expr);;
    break;}
case 78:
#line 221 "gram.y"
{yyval.Expr = createBinaryExpr(OrOper, yyvsp[-2].Expr, yyvsp[0].Expr);;
    break;}
case 79:
#line 222 "gram.y"
{yyval.Expr = createBinaryExpr(AndOper, yyvsp[-2].Expr, yyvsp[0].Expr);;
    break;}
case 80:
#line 223 "gram.y"
{yyval.Expr = createBinaryExpr(Equal, yyvsp[-2].Expr, yyvsp[0].Expr);;
    break;}
case 81:
#line 224 "gram.y"
{yyval.Expr = createBinaryExpr(NotEqual, yyvsp[-2].Expr, yyvsp[0].Expr);;
    break;}
case 82:
#line 225 "gram.y"
{yyval.Expr = createUnaryExpr(UPlus, yyvsp[0].Expr);;
    break;}
case 83:
#line 226 "gram.y"
{yyval.Expr = createUnaryExpr(UMinus, yyvsp[0].Expr);;
    break;}
case 84:
#line 227 "gram.y"
{yyval.Expr = createUnaryExpr(Not, yyvsp[0].Expr);;
    break;}
case 85:
#line 228 "gram.y"
{yyval.Expr = CreateCallMethodExpr(CallFunc,NULL, yyvsp[-1].ExprList, yyvsp[-3].Id,NULL);;
    break;}
case 86:
#line 229 "gram.y"
{yyval.Expr = yyvsp[-1].Expr;;
    break;}
case 87:
#line 230 "gram.y"
{yyval.Expr = createIndArrayExpr(yyvsp[-3].Expr, yyvsp[-1].Expr);;
    break;}
case 88:
#line 231 "gram.y"
{yyval.Expr = createEmptyIndArrayExpr(yyvsp[-2].Expr);;
    break;}
case 89:
#line 232 "gram.y"
{yyval.Expr = CreateCallMethodExpr(Arrow,yyvsp[-5].Expr, yyvsp[-1].ExprList, yyvsp[-3].Id,"meth");;
    break;}
case 90:
#line 233 "gram.y"
{yyval.Expr = CreateCallMethodExpr(Arrow,yyvsp[-2].Expr, NULL, yyvsp[0].Id,"field");;
    break;}
case 91:
#line 234 "gram.y"
{yyval.Expr = createDoubleColonExpr(yyvsp[-2].Id, yyvsp[0].Expr);;
    break;}
case 92:
#line 235 "gram.y"
{yyval.Expr = createNewExpr(yyvsp[-3].Id, yyvsp[-1].ExprList);;
    break;}
case 93:
#line 238 "gram.y"
{yyval.ExprList=NULL;;
    break;}
case 94:
#line 239 "gram.y"
{yyval.ExprList=yyvsp[0].ExprList;;
    break;}
case 95:
#line 242 "gram.y"
{yyval.ExprList = addToExprList(yyvsp[-2].ExprList,yyvsp[0].Expr);;
    break;}
case 96:
#line 243 "gram.y"
{yyval.ExprList = createExprList(yyvsp[0].Expr);;
    break;}
}
   /* the action file gets copied in in place of this dollarsign */
#line 487 "bison.simple"

  yyvsp -= yylen;
  yyssp -= yylen;
#ifdef YYLSP_NEEDED
  yylsp -= yylen;
#endif

#if YYDEBUG != 0
  if (yydebug)
    {
      short *ssp1 = yyss - 1;
      fprintf (stderr, "state stack now");
      while (ssp1 != yyssp)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif

  *++yyvsp = yyval;

#ifdef YYLSP_NEEDED
  yylsp++;
  if (yylen == 0)
    {
      yylsp->first_line = yylloc.first_line;
      yylsp->first_column = yylloc.first_column;
      yylsp->last_line = (yylsp-1)->last_line;
      yylsp->last_column = (yylsp-1)->last_column;
      yylsp->text = 0;
    }
  else
    {
      yylsp->last_line = (yylsp+yylen-1)->last_line;
      yylsp->last_column = (yylsp+yylen-1)->last_column;
    }
#endif

  /* Now "shift" the result of the reduction.
     Determine what state that goes to,
     based on the state we popped back to
     and the rule number reduced by.  */

  yyn = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTBASE];

  goto yynewstate;

yyerrlab:   /* here on detecting error */

  if (! yyerrstatus)
    /* If not already recovering from an error, report this error.  */
    {
      ++yynerrs;

#ifdef YYERROR_VERBOSE
      yyn = yypact[yystate];

      if (yyn > YYFLAG && yyn < YYLAST)
	{
	  int size = 0;
	  char *msg;
	  int x, count;

	  count = 0;
	  /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
	  for (x = (yyn < 0 ? -yyn : 0);
	       x < (sizeof(yytname) / sizeof(char *)); x++)
	    if (yycheck[x + yyn] == x)
	      size += strlen(yytname[x]) + 15, count++;
	  msg = (char *) malloc(size + 15);
	  if (msg != 0)
	    {
	      strcpy(msg, "parse error");

	      if (count < 5)
		{
		  count = 0;
		  for (x = (yyn < 0 ? -yyn : 0);
		       x < (sizeof(yytname) / sizeof(char *)); x++)
		    if (yycheck[x + yyn] == x)
		      {
			strcat(msg, count == 0 ? ", expecting `" : " or `");
			strcat(msg, yytname[x]);
			strcat(msg, "'");
			count++;
		      }
		}
	      yyerror(msg);
	      free(msg);
	    }
	  else
	    yyerror ("parse error; also virtual memory exceeded");
	}
      else
#endif /* YYERROR_VERBOSE */
	yyerror("parse error");
    }

  goto yyerrlab1;
yyerrlab1:   /* here on error raised explicitly by an action */

  if (yyerrstatus == 3)
    {
      /* if just tried and failed to reuse lookahead token after an error, discard it.  */

      /* return failure if at end of input */
      if (yychar == YYEOF)
	YYABORT;

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
#endif

      yychar = YYEMPTY;
    }

  /* Else will try to reuse lookahead token
     after shifting the error token.  */

  yyerrstatus = 3;		/* Each real token shifted decrements this */

  goto yyerrhandle;

yyerrdefault:  /* current state does not do anything special for the error token. */

#if 0
  /* This is wrong; only states that explicitly want error tokens
     should shift them.  */
  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
  if (yyn) goto yydefault;
#endif

yyerrpop:   /* pop the current state because it cannot handle the error token */

  if (yyssp == yyss) YYABORT;
  yyvsp--;
  yystate = *--yyssp;
#ifdef YYLSP_NEEDED
  yylsp--;
#endif

#if YYDEBUG != 0
  if (yydebug)
    {
      short *ssp1 = yyss - 1;
      fprintf (stderr, "Error: state stack now");
      while (ssp1 != yyssp)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif

yyerrhandle:

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yyerrdefault;

  yyn += YYTERROR;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
    goto yyerrdefault;

  yyn = yytable[yyn];
  if (yyn < 0)
    {
      if (yyn == YYFLAG)
	goto yyerrpop;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrpop;

  if (yyn == YYFINAL)
    YYACCEPT;

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Shifting error token, ");
#endif

  *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  yystate = yyn;
  goto yynewstate;
}
#line 246 "gram.y"

int yyerror(char const *str)
{
    printf("error occured");
};
		  